# coding=utf-8
from wtforms import Form, StringField, IntegerField
from wtforms.validators import regexp, Length


class LoginForm(Form):
    phone = StringField(
        validators=[regexp(r"^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$", message="手机号格式错误!")])
    code = StringField(validators=[Length(4, 4, message='验证码格式不正确!')])
